package com.apes.bi.model;

import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import com.apes.framework.jpa.Name;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;


@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = WidgetApi.CONST_TABLE_NAME)

public class WidgetApi extends Model {
    public static final String CONST_TABLE_NAME = "bi_widget_api";

    @Id
    @Column(name = "id", length = 200)
    private String id; // api 编码

    @Name
    @Column(name = "name", nullable = false, length = 60)
    private String name; //描述

}
